$( document ).ready( function() {

    var body =
        $('body').css( {
            'overflow': 'hidden',
            'background-color': 'black',
            'color': 'white' } );

    var pageHeader = new DiscGolf.Views['pageHeader']( { el: '#pageHeader' } );

    if( DiscGolf.golferId ) {
    
        var characterSelection =
            new DiscGolf.Views['characterSelection']( {
                el: DiscGolf.CommonLib.makeEl('div').attr( { 'id': 'characterSelection' } )
                                                    .appendTo( body ),
                hide: true,
                golfer: new DiscGolf.Models['golfer']( { id: DiscGolf.golferId } ) } );

        characterSelection.listenTo( pageHeader, 'loggedInTransitionComplete', characterSelection.unHide );
        
        pageHeader.showLoggedInTransition();

    } else {

        pageHeader.showLogin();
    }

} );
